package LeedCode.Dictionary;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;

public class Main {
    public static  void  main(String[] args){
        Hashtable balance = new Hashtable<>();
        Enumeration names;
        String str;
        double bal;

        balance.put("zara",new Double(3434.34));
        balance.put("Mahnaz",new Double(123.22));
        balance.put("JackYang",new Double(1378.0));
        balance.put("Daisy",new Double(99.22));

        names = balance.keys();
        while(names.hasMoreElements()){
            str=(String) names.nextElement();
            System.out.println(str+":"+balance.get(str));
        }
        System.out.println();

        bal =((Double)balance.get("zara")).doubleValue();
        balance.put("zara",new Double(bal+1000));
        System.out.println("zara"+balance.get("zara"));

    }
}
